//
//  NSArray+modeDics.m
//  OnlineShop
//
//  Created by Right on 16/1/20.
//  Copyright © 2016年 m. All rights reserved.
//

#import "NSArray+modeDics.h"

@implementation NSArray (ModeDics)
+ (NSArray *) lz_modelWithClass:(Class)cls dicsArray:(NSArray*)dics{
    if (!cls || !dics) return nil;
    NSMutableArray *result = [NSMutableArray new];
    for (NSDictionary *dic in dics) {
        if (![dic isKindOfClass:[NSDictionary class]]) continue;
        NSObject *obj = [[cls alloc]initWithDictionary:dic];
        if (obj) [result addObject:obj];
    }
    return result;

}
@end
